using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace HRM.Models.Mapping
{
    public class DotDK_TKMap : EntityTypeConfiguration<DotDK_TK>
    {
        public DotDK_TKMap()
        {
            // Primary Key
            this.HasKey(t => t.MaDDKy);

            // Properties
            this.Property(t => t.MaDDKy)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.TenDDKy)
                .HasMaxLength(50);

            this.Property(t => t.MaNV)
                .HasMaxLength(10);

            this.Property(t => t.TenNV)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("DotDK-TK");
            this.Property(t => t.MaDDKy).HasColumnName("MaDDKy");
            this.Property(t => t.TenDDKy).HasColumnName("TenDDKy");
            this.Property(t => t.TgBatDau).HasColumnName("TgBatDau");
            this.Property(t => t.TgKetThuc).HasColumnName("TgKetThuc");
            this.Property(t => t.MaNV).HasColumnName("MaNV");
            this.Property(t => t.TenNV).HasColumnName("TenNV");
        }
    }
}
